$(function() {
	$("#tabs").tabs();
});

$(function() {
	$("#birthday").datepicker({
		showOn: 'button',
		buttonImage: 'images/calendar.gif',
		buttonImageOnly: true,
		changeMonth: true,
		changeYear: true
	});
	$("#birthday").datepicker($.datepicker.regional['zh-CN']);
});

function save() {
	var elemUserinfo = $('#customerInfo');
	
	var userinfo = elemUserinfo.serializeObject();
	alert(userinfo);
	var jsonuserinfo = JSON.stringify(userinfo);
	
	jQuery.ajax( {
		type : 'POST',
		contentType : 'application/json',
		url : 'customerInfo/new.do',
		data : jsonuserinfo,
		dataType : 'json',
		success : function(resp) {
			if (resp.successed) {
				alert("数据已成功保存" );
				elemUserinfo.applyErrors({});
			} else {
				elemUserinfo.applyErrors(resp.errors);
			}
		},
		error : ajaxFailed
	});
};